import { setConfig } from './utils/config';
import { reportError } from './utils/request';
import baseMonitorStart from './base';
import apiMonitorStart from './api-monitor';
import vueMonitorStart from './vue';

const monitor = {};

// 配置接口
monitor.config = (config) => {
  setConfig(config);
};

// 提供自定义错误上报接口
monitor.reportError = (errInfo) => {
  errInfo.type = 'self-defined';
  reportError(errInfo);
};

export { monitor, baseMonitorStart, apiMonitorStart, vueMonitorStart };
